package wyy02;

public class Fruit {
    private String name;
    private String area;
    private double price;

    public Fruit() {
    }

    public Fruit(String name, String area, double price) {
        this.name = name;
        this.area = area;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void juicing(){
        System.out.println("榨汁");
    }

    public void removePeel(Fruit fruit){
        System.out.println(fruit.getName()+"去皮");
    }

    @Override
    public String toString() {
        return "水果：【" +
                "水果名称：'" + name + '\'' +
                ", 水果产地：'" + area + '\'' +
                ", 水果价格：" + price +"元"+
                '】';
    }
}

